package group2assignone.ucm.administrator;

import group2assignone.ucm.UCController;
import group2assignone.view.administrator.AddNewManagerView;

/**
 * Use Case: Change UI to  Use case Main Administrator View                 <br>
 * Pre-condition: User has clicked cancel from the Add Manager view.        <br>
 * Post-condition: Administrator main UI Use Case is run                    <br>
 * 1. system closes the  Add Manager view                                   <br>
 * 2. system runs the use case UI Admin Main View                           <br>
 * @author group2                                                           <br>
 */
public class UCCancelAddManager implements UCController {

    private AddNewManagerView view;

    public UCCancelAddManager(AddNewManagerView v) {
        view = v;

    }


    public void run() {
        //1. system closes the  Add Manager view
        view.dispose();
        // 2. system runs the use case UI Admin Main View
        UCUIAdminMainView ucmv = UCUIAdminMainView.getInstance();
        ucmv.run();
    }
}
